import request from "@/utils/request";

const baseApi = '/role'

export const roleManageApi = {
  // 获取角色列表
  getRolePage: (params: object) => request.get(baseApi+'/page', { params }),
  // 获取角色详情
  getRoleDetail: (id: number) => request.get(`${baseApi}/${id}`),
  // 新增角色
  addRole: (data: object) => request.post(baseApi, data),
  // 更新角色
  updateRole: (data: object) => request.put(baseApi, data),
  // 删除角色
  deleteRole: (id: number) => request.delete(`${baseApi}/${id}`)
}